<?php $this->load->view('admin/public/head.html', array('css' => array(
'/assets/admin/css/admin/common.css'
))); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper" ng-controller="admin-bbs-slider-index-controller">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            社区管理
            <small>前后台用户发帖管理</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 后台首页</a></li>
            <li class="active"><a href="/bbs/lists/index">帖子列表</a></li>
            <li class="active">设置主题</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header with-border">
                        <h3 class="box-title">幻灯列表</h3>
                        <div class="box-tools">
                            <div class="input-group input-group-sm" style="width: 150px;">
                                <div class="input-group-btn">
                                    <a href="/bbs/slider/add" class="btn btn-success pull-right">
                                        <i class="fa fa-search"></i>
                                        添加
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body gu-bbs-slider">
                        <table class="table table-bordered gu-slider-lists">
                            <tr>
                                <th class="text-center" style="width: 40px">#</th>
                                <th class="text-center">缩略图</th>
                                <th class="text-center">标题</th>
                                <th class="text-center">广告来源</th>
                                <th class="text-center">开始时间</th>
                                <th class="text-center">结束时间</th>
                                <th class="text-center">状态</th>
                                <th class="text-center" style="width: 70px">查看</th>
                            </tr>
                            <tr ng-repeat="(index, l) in lists">
                                <td class="text-center" ng-bind="l.id"></td>
                                <td class="text-center">
                                    <img onerror="this.src='/assets/admin/img/nothumb.png'" ng-src="{{ l.thumb }}" alt="{{ l.title }}"></td>
                                <td class="text-center">
                                    <a href="###" ng-bind="l.title"></a>
                                </td>
                                <td class="text-center" ng-bind="l.source"></td>
                                <td class="text-center" ng-bind="l.timestart"></td>
                                <td class="text-center" ng-bind="l.timeend"></td>
                                <td class="text-center">
                                    <span class="badge bg-green" ng-show="l.status == 1">正常</span>
                                    <span class="badge bg-warning" ng-show="l.status == 0">禁止</span>
                                </td>
                                <td class="text-center">
                                    <a class="btn btn-link btn-flat btn-xs" href="/bbs/slider/edit?id={{ l.id }}"><i class="fa fa-edit"></i> 编辑</a>
                                    <a class="btn btn-link btn-flat btn-xs" href="javascript:void(0);" ng-click="deleteItem(index)"><i class="fa fa-trash-o"></i> 删除</a>
                                    <a class="btn btn-link btn-flat btn-xs" ng-click="changeStatus(index)" ng-show="l.status == 1" href="javascript:void(0);"><i class="fa fa-lock"></i> 禁用</a>
                                    <a class="btn btn-link btn-flat btn-xs" ng-click="changeStatus(index)" ng-show="l.status == 0" href="javascript:void(0);"><i class="fa fa-unlock"></i> 启用</a>
                                </td>
                            </tr>
                            <tr ng-if="lists.length == 0">
                                <td colspan="8"><p class="text-center help-block">暂无数据</p></td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>

        </div>

    </section>
    <!-- /.content -->

</div>
<!-- /.content-wrapper -->
<?php $this->load->view('admin/public/foot.html', array(
    'js' => array(
        'http://cdn.staticfile.org/webuploader/0.1.0/webuploader.flashonly.min.js',
        '/assets/admin/js/bbs/slider/index.js'
))); ?>
